package cn.edu.csust.coursecard.dao.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

/**
 * 帖子首页内容
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class IndexPost {
    
    //帖子id
    private Integer id;

    //发帖人用户信息
    private UserInfo userInfo;
    
    //内容
    private String content;
    
    //点赞数量
    private Integer likeNum;
    
    //用户是否点赞
    private Boolean isLike = false;
    
    //用户是否收藏
    private Boolean isEnshrine = false;
    
    //评论数量
    private Integer commentNum;
    
    //是否匿名
    private Boolean isAnonymous;
    
    //帖子图片url数组
    private List<String> images;
    
    //发帖时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    
    
}
